const express = require("express");
const uploadRouter = require("../../utils/multer");

// 创建路由对象
const upload = express.Router();

upload.post("/upload", uploadRouter.array("avatar", 3), (req, res) => {
  if (req.status) {
    res.send(req.status);
  } else {
    res.send({
      code: 200,
      data: null,
      message: "上传成功",
    });
  }
});

module.exports = upload;
